Package | example.fhir.uv.mycontentig |
Type | Measure |
Id | Id |
FHIR Version | R4 |
Source | http://somewhere.org/fhir/uv/mycontentig/https://build.fhir.org/ig/cqframework/sample-content-ig/Measure-QuestionnaireMeasureExample.html |
Url | http://somewhere.org/fhir/uv/mycontentig/Measure/QuestionnaireMeasureExample |
Version | 0.4.9-cibuild |
Status | draft |
Date | 2025-04-24T05:02:57-07:00 |
Name | QuestionnaireMeasureExample |
Title | Questionnaire Measure Example |
Experimental | True |
Realm | uv |
Authority | hl7 |
Description | Example measure illustrating a continuous variable measure calculating scores from multiple questionnaires |
No resources found
No resources found
Note: links and images are rebased to the (stated) source
Metadata | |
---|---|
Title | Questionnaire Measure Example |
Version | 0.4.9-cibuild |
Status | Draft |
Experimental | true |
Jurisdiction | Global (Whole world) |
Steward (Publisher) | HL7 International - [Some] Work Group |
Description | Example measure illustrating a continuous variable measure calculating scores from multiple questionnaires |
Measure Scoring | Continuous Variable |
Measure Type | Process |
Improvement Notation | Increased score indicates improvement |
Measure Group (Rate) (ID: group-1) | |
Initial Population |
ID: 8A48538B-80BB-4E8B-9716-559C657278FD
Description: No description provided Logic Definition: Initial Population |
Measure Population |
ID: 8FBD6CFA-99E4-4108-B083-91067C55170E
Description: No description provided Logic Definition: Measure Population |
Measure Observation |
ID: 8B71AD15-47EB-4939-8318-1DF60CABCFD6
Description: No description provided Logic Definition: MeasureObservation |
Measure Logic | |
Primary Library | Measure calculating scores from multiple questionnaires example |
Contents |
Population Criteria
Logic Definitions Terminology Dependencies Data Requirements |
Population Criteria | |
Measure Group (Rate) (ID: group-1) | |
Initial Population | |
|
|
Measure Population | |
|
|
Measure Observation | |
|
|
Logic Definitions | |
Logic Definition | Library Name: QuestionnaireMeasureExample |
|
|
Logic Definition | Library Name: QuestionnaireMeasureExample |
|
|
Logic Definition | Library Name: QuestionnaireMeasureExample |
|
|
Logic Definition | Library Name: PHQ9LogicExample |
|
|
Logic Definition | Library Name: PHQ9LogicExample |
|
|
Logic Definition | Library Name: PHQ9LogicExample |
|
|
Logic Definition | Library Name: PHQ9LogicExample |
|
|
Logic Definition | Library Name: FHIRHelpers |
|
|
Logic Definition | Library Name: FHIRHelpers |
|
|
Terminology | |
Code System |
Description: Code system LOINC
Resource: Logical Observation Identifiers, Names and Codes (LOINC) Canonical URL: http://loinc.org |
Direct Reference Code |
Code: LA6568-5
System: http://loinc.org |
Direct Reference Code |
Code: LA6569-3
System: http://loinc.org |
Direct Reference Code |
Code: LA6570-1
System: http://loinc.org |
Direct Reference Code |
Code: LA6571-9
System: http://loinc.org |
Dependencies | |
Dependency |
Description: Library PHQ9Logic
Resource: PHQ-9 Depression Scoring Logic Example Canonical URL: http://somewhere.org/fhir/uv/mycontentig/Library/PHQ9LogicExample |
Dependency |
Description: Library FHIRHelpers
Resource: http://somewhere.org/fhir/uv/mycontentig/Library/FHIRHelpers|4.0.1
Canonical URL: http://somewhere.org/fhir/uv/mycontentig/Library/FHIRHelpers|4.0.1 |
Data Requirements | |
Data Requirement |
Type: Patient
Profile(s): Patient |
Generated using version 0.4.9-cibuild of the sample-content-ig Liquid templates |
{
"resourceType" : "Measure",
"id" : "QuestionnaireMeasureExample",
"meta" : {
"profile" : [
"http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm"
]
},
"text" : {
"status" : "extensions",
"div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <table class=\"narrative-table\">\n <tbody>\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Metadata</th>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Title</th>\n\n\n<td class=\"content-container\">Questionnaire Measure Example</td>\n</tr>\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Version</th>\n\n\n<td class=\"content-container\">0.4.9-cibuild</td>\n</tr>\n\n\n\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Status</th>\n\n\n<td class=\"content-container\">Draft</td>\n</tr>\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Experimental</th>\n\n\n<td class=\"content-container\">true</td>\n</tr>\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Jurisdiction</th>\n\n\n<td class=\"content-container\"><span title=\"Codes:{http://unstats.un.org/unsd/methods/m49/m49.htm 001}\">Global (Whole world)</span></td>\n</tr>\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Steward (Publisher)</th>\n\n\n<td class=\"content-container\">HL7 International - [Some] Work Group</td>\n</tr>\n\n\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Description</th>\n\n\n<td class=\"content-container\"><div><p>Example measure illustrating a continuous variable measure calculating scores from multiple questionnaires</p>\n</div></td>\n</tr>\n\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Measure Scoring</th>\n\n\n<td class=\"content-container\"><span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-scoring continuous-variable}\">Continuous Variable</span></td>\n</tr>\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Measure Type</th>\n\n\n<td class=\"content-container\"><span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-type process}\">Process</span></td>\n</tr>\n\n\n\n\n\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Improvement Notation</th>\n\n\n<td class=\"content-container\"><span title=\"Codes:{http://terminology.hl7.org/CodeSystem/measure-improvement-notation increase}\">Increased score indicates improvement</span></td>\n</tr>\n\n\n\n\n\n\n\n\n\n \n \n <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Group (Rate) (ID: group-1)</th>\n\n\n</tr>\n \n \n \n\n\n\n\n\n\n\n\n\n \n \n <tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Initial Population</th>\n\n\n \n <td class=\"content-container\">\n \n <em>ID</em>: 8A48538B-80BB-4E8B-9716-559C657278FD\n <br/>\n \n \n <em>Description</em>: No description provided\n \n \n \n \n <em>Logic Definition</em>: <a href=\"#primary-questionnairemeasureexample-initial-population\">Initial Population</a> \n \n \n </td>\n </tr>\n \n\n \n <tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Measure Population</th>\n\n\n \n <td class=\"content-container\">\n \n <em>ID</em>: 8FBD6CFA-99E4-4108-B083-91067C55170E\n <br/>\n \n \n <em>Description</em>: No description provided\n \n \n \n \n <em>Logic Definition</em>: <a href=\"#primary-questionnairemeasureexample-measure-population\">Measure Population</a> \n \n \n </td>\n </tr>\n \n\n \n <tr>\n \n \n\n<th scope=\"row\" class=\"row-header\">Measure Observation</th>\n\n\n \n <td class=\"content-container\">\n \n <em>ID</em>: 8B71AD15-47EB-4939-8318-1DF60CABCFD6\n <br/>\n \n \n <em>Description</em>: No description provided\n \n \n \n \n <em>Logic Definition</em>: <a href=\"#primary-questionnairemeasureexample-measureobservation\">MeasureObservation</a> \n \n \n </td>\n </tr>\n \n\n \n\n\n\n\n\n<tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Logic</th>\n\n\n</tr>\n\n<tr>\n\n\n<th scope=\"row\" class=\"row-header\">Primary Library</th>\n\n\n<td class=\"content-container\"><a href=\"Library-QuestionnaireMeasureExample.html\">Measure calculating scores from multiple questionnaires example</a></td>\n</tr>\n\n\n\n\n<tr>\n <th scope=\"row\" class=\"row-header\">Contents</th>\n <td class=\"content-container\">\n <em><a href=\"#population-criteria\">Population Criteria</a></em>\n <br/>\n <em><a href=\"#definitions\">Logic Definitions</a></em>\n <br/>\n <em><a href=\"#terminology\">Terminology</a></em>\n <br/>\n <em><a href=\"#dependencies\">Dependencies</a></em>\n <br/>\n <em><a href=\"#data-requirements\">Data Requirements</a></em>\n <br/>\n </td>\n</tr>\n\n\n <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"population-criteria\"> </a>Population Criteria</th>\n\n\n</tr>\n \n \n \n \n \n <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\">Measure Group (Rate) (ID: group-1)</th>\n\n\n</tr>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n <tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n \n \n <a name=\"primary-questionnairemeasureexample-initial-population\"> </a>\n \n \n Initial Population\n \n </th>\n</tr>\n<tr>\n\n <td>\n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define "Initial Population":\n AgeInYearsAt(start of "Measurement Period") >= 18</code></pre>\n </td>\n\n</tr>\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n <tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n \n \n <a name=\"primary-questionnairemeasureexample-measure-population\"> </a>\n \n \n Measure Population\n \n </th>\n</tr>\n<tr>\n\n <td>\n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">// Likely some condition or other relevant characteristic such as a depression diagnosis\ndefine "Measure Population":\n true</code></pre>\n </td>\n\n</tr>\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n <tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n \n \n <a name=\"primary-questionnairemeasureexample-measureobservation\"> </a>\n \n \n Measure Observation\n \n </th>\n</tr>\n<tr>\n\n <td>\n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\nMeasure observation is a function defined in terms of the types of members of the measure\npopulation, Patient in this case. In a population evaluation scenario, the measure\nobservation is evaluated for every member of the population.\n\nIn an individual report scenario, however, the measure observation is evaluated for\nthe current patient. Note that the patient context is flowing through the call here\n*/\ndefine function "MeasureObservation"(patient Patient):\n PHQ9Logic.CalculateTotalScore</code></pre>\n </td>\n\n</tr>\n\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n \n \n\n\n <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"definitions\"> </a>Logic Definitions</th>\n\n\n</tr>\n \n \n \n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n \n \n <a name=\"questionnairemeasureexample-initial-population\"> </a>\n \n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> QuestionnaireMeasureExample</td>\n\n</tr>\n<tr>\n\n <td>\n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define "Initial Population":\n AgeInYearsAt(start of "Measurement Period") >= 18</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n \n \n <a name=\"questionnairemeasureexample-measure-population\"> </a>\n \n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> QuestionnaireMeasureExample</td>\n\n</tr>\n<tr>\n\n <td>\n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">// Likely some condition or other relevant characteristic such as a depression diagnosis\ndefine "Measure Population":\n true</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n \n \n <a name=\"questionnairemeasureexample-measureobservation\"> </a>\n \n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> QuestionnaireMeasureExample</td>\n\n</tr>\n<tr>\n\n <td>\n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\nMeasure observation is a function defined in terms of the types of members of the measure\npopulation, Patient in this case. In a population evaluation scenario, the measure\nobservation is evaluated for every member of the population.\n\nIn an individual report scenario, however, the measure observation is evaluated for\nthe current patient. Note that the patient context is flowing through the call here\n*/\ndefine function "MeasureObservation"(patient Patient):\n PHQ9Logic.CalculateTotalScore</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n\n \n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n \n \n <a name=\"phq9logicexample-questionnaireresponse\"> </a>\n \n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> PHQ9LogicExample</td>\n\n</tr>\n<tr>\n\n <td>\n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">// Use the QuestionnaireResponse provided as a parameter if available\n// Otherwise look it up from the record\ndefine "QuestionnaireResponse":\n if response is not null then\n response\n else\n Last(\n [QuestionnaireResponse] QR\n where QR.questionnaire = 'http://somewhere.org/fhir/uv/mycontentig/Questionnaire/phq-9-questionnaire'\n sort by (authored as FHIR.dateTime) desc\n )</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n \n \n <a name=\"phq9logicexample-responses\"> </a>\n \n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> PHQ9LogicExample</td>\n\n</tr>\n<tr>\n\n <td>\n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">// NOTE: This ties this logic directly to this particular rendering of the Questionnaire.\n// Ideally the items would be filtered based on Code of the Item, rather than the LinkId,\n// but that would require pulling in the Questionnaire because the QuestionnaireResponse\n// only has the LinkId.\ndefine "Responses":\n "QuestionnaireResponse" QR\n return QR.item I where I.linkId in {\n 'LittleInterest',\n 'FeelingDown',\n 'TroubleSleeping',\n 'FeelingTired',\n 'BadApetite',\n 'FeelingBadAboutSelf',\n 'TroubleConcetrating',\n 'MovingSpeaking'\n }</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n \n \n <a name=\"phq9logicexample-calculatetotalscore\"> </a>\n \n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> PHQ9LogicExample</td>\n\n</tr>\n<tr>\n\n <td>\n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define "CalculateTotalScore":\n Sum("Responses" R return all AnswerCardinality(First(R.answer.value)))</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n \n \n <a name=\"phq9logicexample-answercardinality\"> </a>\n \n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> PHQ9LogicExample</td>\n\n</tr>\n<tr>\n\n <td>\n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">/*\n@source: https://www.med.umich.edu/1info/FHP/practiceguides/depress/score.pdf\n*/\ndefine function "AnswerCardinality"(answer Coding):\n case\n when answer ~ "Not at all" then 0\n when answer ~ "Several days" then 1\n when answer ~ "More than half the days" then 2\n when answer ~ "Nearly every day" then 3\n else null\n end</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n\n \n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n \n \n <a name=\"fhirhelpers-tostring\"> </a>\n \n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToString(value string): value.value</code></pre>\n </td>\n\n</tr>\n\n\n\n \n\n\n\n \n\n\n<tr>\n <th scope=\"row\" rowspan=\"2\" class=\"row-header\">\n \n \n <a name=\"fhirhelpers-tocode\"> </a>\n \n Logic Definition\n </th>\n\n <td class=\"content-container\"><em>Library Name:</em> FHIRHelpers</td>\n\n</tr>\n<tr>\n\n <td>\n <pre style=\"border: none;\" class=\"content-container highlight language-cql\"><code class=\"language-cql\">define function ToCode(coding FHIR.Coding):\n if coding is null then\n null\n else\n System.Code {\n code: coding.code.value,\n system: coding.system.value,\n version: coding.version.value,\n display: coding.display.value\n }</code></pre>\n </td>\n\n</tr>\n\n\n\n\n\n \n \n\n\n <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"terminology\"> </a>Terminology</th>\n\n\n</tr>\n \n \n \n\n \n\n \n\n\n<tr>\n \n \n \n\n<th scope=\"row\" class=\"row-header\">Code System</th>\n\n\n \n <td class=\"content-container\">\n \n <em>Description</em>: Code system LOINC\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"http://terminology.hl7.org/5.2.0/CodeSystem-v3-loinc.html\">Logical Observation Identifiers, Names and Codes (LOINC)</a>\n <br/>\n <em>Canonical URL</em>: <tt>http://loinc.org</tt>\n \n </td>\n</tr>\n \n\n\n \n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Code</em>: LA6568-5\n <br/>\n <em>System</em>: <tt>http://loinc.org</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Code</em>: LA6569-3\n <br/>\n <em>System</em>: <tt>http://loinc.org</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Code</em>: LA6570-1\n <br/>\n <em>System</em>: <tt>http://loinc.org</tt>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\" class=\"row-header\">Direct Reference Code</th>\n <td class=\"content-container\">\n \n <em>Code</em>: LA6571-9\n <br/>\n <em>System</em>: <tt>http://loinc.org</tt>\n </td>\n </tr>\n\n \n \n\n\n <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"dependencies\"> </a>Dependencies</th>\n\n\n</tr>\n \n \n \n\n\n<tr>\n \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n <td class=\"content-container\">\n \n <em>Description</em>: Library PHQ9Logic\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <a href=\"Library-PHQ9LogicExample.html\">PHQ-9 Depression Scoring Logic Example</a>\n <br/>\n <em>Canonical URL</em>: <tt>http://somewhere.org/fhir/uv/mycontentig/Library/PHQ9LogicExample</tt>\n \n </td>\n</tr>\n \n\n\n<tr>\n \n\n<th scope=\"row\" class=\"row-header\">Dependency</th>\n\n\n <td class=\"content-container\">\n \n <em>Description</em>: Library FHIRHelpers\n \n <br/>\n \n \n \n \n \n \n <em>Resource</em>: <code>http://somewhere.org/fhir/uv/mycontentig/Library/FHIRHelpers|4.0.1</code>\n <br/>\n <em>Canonical URL</em>: <tt>http://somewhere.org/fhir/uv/mycontentig/Library/FHIRHelpers|4.0.1</tt>\n \n </td>\n</tr>\n \n\n \n\n\n \n \n\n\n <tr>\n\n\n<th colspan=\"2\" scope=\"row\" class=\"row-header\"><a name=\"data-requirements\"> </a>Data Requirements</th>\n\n\n</tr>\n \n \n \n<tr>\n <th scope=\"row\" class=\"row-header\">Data Requirement</th>\n <td class=\"content-container\">\n <em>Type</em>: Patient\n <br/>\n \n <em>Profile(s)</em>: \n \n <a href=\"http://hl7.org/fhir/R4/patient.html\">Patient</a>\n <br/> \n \n \n \n \n </td>\n</tr>\n\n \n \n\n<tr>\n <th colspan=\"2\" scope=\"row\" class=\"row-header\">Generated using version 0.4.9-cibuild of the sample-content-ig Liquid templates</th>\n</tr>\n\n </tbody>\n </table>\n</div>"
},
"contained" : [
{
"resourceType" : "Library",
"id" : "effective-data-requirements",
"extension" : [
{
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
"valueCoding" : {
"system" : "http://loinc.org",
"code" : "LA6568-5"
}
},
{
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
"valueCoding" : {
"system" : "http://loinc.org",
"code" : "LA6569-3"
}
},
{
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
"valueCoding" : {
"system" : "http://loinc.org",
"code" : "LA6570-1"
}
},
{
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
"valueCoding" : {
"system" : "http://loinc.org",
"code" : "LA6571-9"
}
},
{
"extension" : [
{
"url" : "libraryName",
"valueString" : "PHQ9LogicExample"
},
{
"url" : "name",
"valueString" : "QuestionnaireResponse"
},
{
"url" : "statement",
"valueString" : "// Use the QuestionnaireResponse provided as a parameter if available\n// Otherwise look it up from the record\ndefine \"QuestionnaireResponse\":\n if response is not null then\n response\n else\n Last(\n [QuestionnaireResponse] QR\n where QR.questionnaire = 'http://somewhere.org/fhir/uv/mycontentig/Questionnaire/phq-9-questionnaire'\n sort by (authored as FHIR.dateTime) desc\n )"
},
{
"url" : "displaySequence",
"valueInteger" : 0
}
],
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
},
{
"extension" : [
{
"url" : "libraryName",
"valueString" : "PHQ9LogicExample"
},
{
"url" : "name",
"valueString" : "Responses"
},
{
"url" : "statement",
"valueString" : "// NOTE: This ties this logic directly to this particular rendering of the Questionnaire.\n// Ideally the items would be filtered based on Code of the Item, rather than the LinkId,\n// but that would require pulling in the Questionnaire because the QuestionnaireResponse\n// only has the LinkId.\ndefine \"Responses\":\n \"QuestionnaireResponse\" QR\n return QR.item I where I.linkId in {\n 'LittleInterest',\n 'FeelingDown',\n 'TroubleSleeping',\n 'FeelingTired',\n 'BadApetite',\n 'FeelingBadAboutSelf',\n 'TroubleConcetrating',\n 'MovingSpeaking'\n }"
},
{
"url" : "displaySequence",
"valueInteger" : 1
}
],
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
},
{
"extension" : [
{
"url" : "libraryName",
"valueString" : "PHQ9LogicExample"
},
{
"url" : "name",
"valueString" : "CalculateTotalScore"
},
{
"url" : "statement",
"valueString" : "define \"CalculateTotalScore\":\n Sum(\"Responses\" R return all AnswerCardinality(First(R.answer.value)))"
},
{
"url" : "displaySequence",
"valueInteger" : 2
}
],
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
},
{
"extension" : [
{
"url" : "libraryName",
"valueString" : "QuestionnaireMeasureExample"
},
{
"url" : "name",
"valueString" : "Initial Population"
},
{
"url" : "statement",
"valueString" : "define \"Initial Population\":\n AgeInYearsAt(start of \"Measurement Period\") >= 18"
},
{
"url" : "displaySequence",
"valueInteger" : 3
}
],
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
},
{
"extension" : [
{
"url" : "libraryName",
"valueString" : "QuestionnaireMeasureExample"
},
{
"url" : "name",
"valueString" : "Measure Population"
},
{
"url" : "statement",
"valueString" : "// Likely some condition or other relevant characteristic such as a depression diagnosis\ndefine \"Measure Population\":\n true"
},
{
"url" : "displaySequence",
"valueInteger" : 4
}
],
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
},
{
"extension" : [
{
"url" : "libraryName",
"valueString" : "QuestionnaireMeasureExample"
},
{
"url" : "name",
"valueString" : "MeasureObservation"
},
{
"url" : "statement",
"valueString" : "/*\nMeasure observation is a function defined in terms of the types of members of the measure\npopulation, Patient in this case. In a population evaluation scenario, the measure\nobservation is evaluated for every member of the population.\n\nIn an individual report scenario, however, the measure observation is evaluated for\nthe current patient. Note that the patient context is flowing through the call here\n*/\ndefine function \"MeasureObservation\"(patient Patient):\n PHQ9Logic.CalculateTotalScore"
},
{
"url" : "displaySequence",
"valueInteger" : 5
}
],
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
},
{
"extension" : [
{
"url" : "libraryName",
"valueString" : "FHIRHelpers"
},
{
"url" : "name",
"valueString" : "ToString"
},
{
"url" : "statement",
"valueString" : "define function ToString(value string): value.value"
},
{
"url" : "displaySequence",
"valueInteger" : 6
}
],
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
},
{
"extension" : [
{
"url" : "libraryName",
"valueString" : "PHQ9LogicExample"
},
{
"url" : "name",
"valueString" : "AnswerCardinality"
},
{
"url" : "statement",
"valueString" : "/*\n@source: https://www.med.umich.edu/1info/FHP/practiceguides/depress/score.pdf\n*/\ndefine function \"AnswerCardinality\"(answer Coding):\n case\n when answer ~ \"Not at all\" then 0\n when answer ~ \"Several days\" then 1\n when answer ~ \"More than half the days\" then 2\n when answer ~ \"Nearly every day\" then 3\n else null\n end"
},
{
"url" : "displaySequence",
"valueInteger" : 7
}
],
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
},
{
"extension" : [
{
"url" : "libraryName",
"valueString" : "FHIRHelpers"
},
{
"url" : "name",
"valueString" : "ToCode"
},
{
"url" : "statement",
"valueString" : "define function ToCode(coding FHIR.Coding):\n if coding is null then\n null\n else\n System.Code {\n code: coding.code.value,\n system: coding.system.value,\n version: coding.version.value,\n display: coding.display.value\n }"
},
{
"url" : "displaySequence",
"valueInteger" : 8
}
],
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
}
],
"name" : "EffectiveDataRequirements",
"status" : "active",
"type" : {
"coding" : [
{
"system" : "http://terminology.hl7.org/CodeSystem/library-type",
"code" : "module-definition"
}
]
},
"relatedArtifact" : [
{
"type" : "depends-on",
"display" : "Library PHQ9Logic",
"resource" : "http://somewhere.org/fhir/uv/mycontentig/Library/PHQ9LogicExample"
},
{
"type" : "depends-on",
"display" : "Library FHIRHelpers",
"resource" : "http://somewhere.org/fhir/uv/mycontentig/Library/FHIRHelpers|4.0.1"
},
{
"type" : "depends-on",
"display" : "Code system LOINC",
"resource" : "http://loinc.org"
}
],
"parameter" : [
{
"name" : "Measurement Period",
"use" : "in",
"min" : 0,
"max" : "1",
"type" : "Period"
},
{
"name" : "Initial Population",
"use" : "out",
"min" : 0,
"max" : "1",
"type" : "boolean"
},
{
"name" : "Measure Population",
"use" : "out",
"min" : 0,
"max" : "1",
"type" : "boolean"
}
],
"dataRequirement" : [
{
"type" : "Patient",
"profile" : [
"http://hl7.org/fhir/StructureDefinition/Patient"
]
}
]
}
],
"extension" : [
{
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem",
"valueReference" : {
"reference" : "Device/cqf-tooling"
}
},
{
"id" : "effective-data-requirements",
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements",
"valueReference" : {
"reference" : "#effective-data-requirements"
}
}
],
"url" : "http://somewhere.org/fhir/uv/mycontentig/Measure/QuestionnaireMeasureExample",
"version" : "0.4.9-cibuild",
"name" : "QuestionnaireMeasureExample",
"title" : "Questionnaire Measure Example",
"status" : "draft",
"experimental" : true,
"date" : "2025-04-24T05:02:57-07:00",
"publisher" : "HL7 International - [Some] Work Group",
"contact" : [
{
"telecom" : [
{
"system" : "url",
"value" : "http://hl7.org/Special/committees/[something]"
}
]
}
],
"description" : "Example measure illustrating a continuous variable measure calculating scores from multiple questionnaires",
"jurisdiction" : [
{
"coding" : [
{
"system" : "http://unstats.un.org/unsd/methods/m49/m49.htm",
"code" : "001"
}
]
}
],
"library" : [
"http://somewhere.org/fhir/uv/mycontentig/Library/QuestionnaireMeasureExample"
],
"scoring" : {
"coding" : [
{
"system" : "http://terminology.hl7.org/CodeSystem/measure-scoring",
"code" : "continuous-variable",
"display" : "Continuous Variable"
}
]
},
"type" : [
{
"coding" : [
{
"system" : "http://terminology.hl7.org/CodeSystem/measure-type",
"code" : "process"
}
]
}
],
"improvementNotation" : {
"coding" : [
{
"system" : "http://terminology.hl7.org/CodeSystem/measure-improvement-notation",
"code" : "increase"
}
]
},
"group" : [
{
"id" : "group-1",
"population" : [
{
"id" : "8A48538B-80BB-4E8B-9716-559C657278FD",
"code" : {
"coding" : [
{
"system" : "http://terminology.hl7.org/CodeSystem/measure-population",
"code" : "initial-population",
"display" : "Initial Population"
}
]
},
"criteria" : {
"language" : "text/cql-identifier",
"expression" : "Initial Population"
}
},
{
"id" : "8FBD6CFA-99E4-4108-B083-91067C55170E",
"code" : {
"coding" : [
{
"system" : "http://terminology.hl7.org/CodeSystem/measure-population",
"code" : "measure-population",
"display" : "Measure Population"
}
]
},
"criteria" : {
"language" : "text/cql-identifier",
"expression" : "Measure Population"
}
},
{
"id" : "8B71AD15-47EB-4939-8318-1DF60CABCFD6",
"extension" : [
{
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-aggregateMethod",
"valueCode" : "average"
},
{
"url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-criteriaReference",
"valueString" : "8FBD6CFA-99E4-4108-B083-91067C55170E"
}
],
"code" : {
"coding" : [
{
"system" : "http://terminology.hl7.org/CodeSystem/measure-population",
"code" : "measure-observation",
"display" : "Measure Observation"
}
]
},
"criteria" : {
"language" : "text/cql-identifier",
"expression" : "MeasureObservation"
}
}
]
}
]
}
XIG built as of ??metadata-date??. Found ??metadata-resources?? resources in ??metadata-packages?? packages.